import 'package:flutter/material.dart';
import 'package:flutterapp/utils/navigator_utils.dart';

import '13_1_app_locale.dart';
import '13_2_localization.dart';
import '13_3_custom_widget.dart';

/// @date 2020/08/31  10:40
/// @author 程志强
/// @des 国际化

class ThirteenRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("国际化"),
      ),
      body: Container(
        margin: const EdgeInsets.symmetric(horizontal: 20),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            RaisedButton(
                child: Text("app多语言"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, AppLocale())),
            RaisedButton(
                child: Text("实现Localizations"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, LocalizationsRoute())),
            RaisedButton(
                child: Text("自定义组件 Element"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, CustomWidgetRoute())),
          ],
        ),
      ),
    );
  }
}
